<?php
namespace Home\Model;
use Think\Model;

class StorageDetailModel extends Model{
	
	const DELETE_STATUS = -1;
	protected $tableName = 'storage_detail';
	
	/*protected $type = array(
     '1'=>'耗材/文印设备',
     '2'=>'IT/数码/通讯',
     '3'=>'办公设备/电器',
     '4'=>'办公日用',
     '5'=>'食品/饮料',
     '6'=>'礼品/卡卷',
     '7'=>'文具/财务',
     '8'=>'纸张',
    );*/
	
	
	/*public function getType($index){
    	if (!empty($index)) {
    		return $this->type[$index];
    	} else {
    		return $this->type;
    	}
    }*/
	
	
	public function delete($ids=array()){
        // return $this->where(array('id'=>array('in', $ids )))->save(array('status'=>-1));
        $id_arr = explode(",", $ids);
        return $this->data(array('info_status'=>self::DELETE_STATUS))->where(array('id'=> array('in', $id_arr)))->save();
    }
}